package com.frame.easy.modular.activiti.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.frame.easy.base.model.IModel;
import com.frame.easy.common.page.Page;
import org.activiti.engine.impl.persistence.entity.ModelEntity;

/**
 * Activiti 流程模型
 *
 * @author tengchong
 * @date 2019-07-02
 */
public class Model extends ModelEntity implements IModel {

    /**
     * 描述
     */
    @TableField(exist=false)
    private String description;

    @TableField(exist=false)
    private Page page;
    @Override
    public Page getPage() {
        return page;
    }

    public void setPage(Page page) {
        this.page = page;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public ModelEntity getModelEntity(){
        ModelEntity modelEntity = new ModelEntity();
        modelEntity.setName(this.name);
        modelEntity.setKey(this.key);
        modelEntity.setCategory(this.category);
        modelEntity.setMetaInfo(this.metaInfo);
        return modelEntity;
    }


}
